package com.luxsoft.siipap.em.replica.importadores.ventas;

import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.Date;

import org.springframework.jdbc.core.RowMapper;

import com.luxsoft.siipap.ventas.model.VentaDet;

public class VentasDetRowMapper implements RowMapper{

	@SuppressWarnings("unused")
	public Object mapRow(ResultSet rs, int rowNum) throws SQLException {
		VentaDet det=new VentaDet();
		
		// Extraemos todos los datos  de la tabla
		Number ALMSUCUR=(Number)rs.getDouble("ALMSUCUR");
		String ALMTIPO=rs.getString("ALMTIPO");
		Number ALMNUMER=(Number)rs.getDouble("ALMNUMER");
		Number ALMRENGL=(Number)rs.getDouble("ALMRENGL");
		Date ALMFECHA=rs.getDate("ALMFECHA");
		String ALMARTIC=rs.getString("ALMARTIC");
		String ALMNOMBR=rs.getString("ALMNOMBR");
		Number ALMKILOS=(Number)rs.getDouble("ALMKILOS");
		Number ALMCANTI=(Number)rs.getDouble("ALMCANTI");
		String ALMSERIE=rs.getString("ALMSERIE");
		String ALMTIPFA=rs.getString("ALMTIPFA");
		Number ALMPRECI=(Number)rs.getDouble("ALMPRECI");
		Number ALMPREFA=(Number)rs.getDouble("ALMPREFA");
		Number ALMPREFAI=(Number)rs.getDouble("ALMPREFAI");
		String ALMTIPIVA=rs.getString("ALMTIPIVA");
		String ALMOBSER=rs.getString("ALMOBSER");
		Date ALMFECH2=rs.getDate("ALMFECH2");
		Number ALMCANT2=(Number)rs.getDouble("ALMCANT2");
		Number ALMSUCODE=(Number)rs.getDouble("ALMSUCODE");
		Number ALMNUCORE=(Number)rs.getDouble("ALMNUCORE");
		Number ALMCOSTO=(Number)rs.getDouble("ALMCOSTO");
		Number ALMPRECPR=(Number)rs.getDouble("ALMPRECPR");
		String ALMNOMDES=rs.getString("ALMNOMDES");
		String ALMPORDES=rs.getString("ALMPORDES");
		String ALMNOMCAR=rs.getString("ALMNOMCAR");
		String ALMPORCAR=rs.getString("ALMPORCAR");
		String ALMUNIDMED=rs.getString("ALMUNIDMED");
		Number ALMUNIXUNI=(Number)rs.getDouble("ALMUNIXUNI");
		Number ALMDEVANFA=(Number)rs.getDouble("ALMDEVANFA");
		Number ALMSALENFA=(Number)rs.getDouble("ALMSALENFA");
		Number ALMRENGLFA=(Number)rs.getDouble("ALMRENGLFA");
		String ALMHORA=rs.getString("ALMHORA");
		Number ALMSEGS=(Number)rs.getDouble("ALMSEGS");
		String ALMUSUAR=rs.getString("ALMUSUAR");
		Number ALMGRUPOIM=(Number)rs.getDouble("ALMGRUPOIM");
		Number ALMSUCCXC=(Number)rs.getDouble("ALMSUCCXC");
		Number ALMIDECXC=(Number)rs.getDouble("ALMIDECXC");
		String ALMSERCXC=rs.getString("ALMSERCXC");
		String ALMTIPCXC=rs.getString("ALMTIPCXC");
		Number ALMNUMCXC=(Number)rs.getDouble("ALMNUMCXC");
		Date ALMFECCXC=rs.getDate("ALMFECCXC");
		Date ALMFEREAL=rs.getDate("ALMFEREAL");
		Number ALMGRAMS=(Number)rs.getDouble("ALMGRAMS");
		Number ALMPREKIL=(Number)rs.getDouble("ALMPREKIL");

		return det;
	}

}
